@REM SET SET_PROMP= -c -O3  -I../Detour/ -DMATHFU_COMPILE_WITHOUT_SIMD_SUPPORT -DOUTPUT_DEBUG 
SET SET_PROMP= -c -O3  -I../Detour/ -DMATHFU_COMPILE_WITHOUT_SIMD_SUPPORT 
SET CPP_COMPILER=g++ -std=c++17 %SET_PROMP%
SET C_COMPLILER=gcc -std=c11 %SET_PROMP%
%CPP_COMPILER% ../Detour/DetourAlloc.cpp
%CPP_COMPILER% ../Detour/DetourAssert.cpp
%CPP_COMPILER% ../Detour/DetourCommon.cpp
%CPP_COMPILER% ../Detour/DetourMath.h
%CPP_COMPILER% ../Detour/DetourNavMesh.cpp
%CPP_COMPILER% ../Detour/DetourNavMeshBuilder.cpp
%CPP_COMPILER% ../Detour/DetourNavMeshQuery.cpp
%CPP_COMPILER% ../Detour/DetourNode.cpp
%CPP_COMPILER% ../Detour/DetourStatus.h
%CPP_COMPILER% ../Finder/NavHelper.cpp
%CPP_COMPILER% ../Finder/PathFinder.cpp
%CPP_COMPILER% ../Finder/ResLoader.cpp
%CPP_COMPILER% ../BridgeCpp.cpp

@REM 支持Temp Obstacles格式需要使用到的文件清单
%C_COMPLILER% -c -O3 ../Contrib/fastlz/fastlz.c
%CPP_COMPILER% ../DetourTileCache/Source/DetourTileCache.cpp
%CPP_COMPILER% ../DetourTileCache/Source/DetourTileCacheBuilder.cpp
%CPP_COMPILER% ../Finder/NavHelperTO.cpp
%CPP_COMPILER% ../Finder/TempObstaclesNavMesh.cpp
%CPP_COMPILER% ../Recast/Recast.cpp
%CPP_COMPILER% ../Recast/RecastAlloc.cpp
%CPP_COMPILER% ../Recast/RecastAssert.cpp
%CPP_COMPILER% ../RecastDemo/ChunkyTriMesh.cpp
%CPP_COMPILER% ../RecastDemo/InputGeom.cpp
%CPP_COMPILER% ../RecastDemo/MeshLoaderObj.cpp

@REM 新的动态阻挡
%CPP_COMPILER% ../Finder/TileCacheOther.cpp
%CPP_COMPILER% ../Finder/NavHelperObs.cpp
%CPP_COMPILER% ../Finder/ObsNavMesh.cpp
%CPP_COMPILER% ../Finder/ObsPathFinder.cpp


ar -crs libPathLib.a *.o
@REM ar -crs libPathLib.a BridgeCpp.o DetourAlloc.o DetourAssert.o DetourCommon.o DetourNavMesh.o DetourNavMeshBuilder.o DetourNavMeshQuery.o DetourNode.o NavHelper.o PathFinder.o ResLoader.o fastlz.o DetourTileCache.o DetourTileCacheBuilder.o TempObstaclesNavMesh.o NavHelperTO.o ChunkyTriMesh.o InputGeom.o Recast.o MeshLoaderObj.o RecastAlloc.o RecastAssert.o

@REM 文件到目标
COPY /B libPathLib.a ..\..\pathfinder\libPathLibwin.a
COPY /B ..\BridgeCpp.h ..\..\pathfinder\BridgeCpp.h
@REM 清理掉中间文件
DEL /a /f /s /q .\*.o .\*.a ..\Detour\*.gch
